+(function (w) {
    function Clazz() {
    };
    // var handles = {};
    Clazz.prototype = {
        getParameters: function () {
            var url = location.search;   //获取url中"?"符后的字串
            var requestParam = new Object();
            if (url.indexOf("?") != -1) {
                var str = url.substr(1);
                strs = str.split("&");
                for (var i = 0; i < strs.length; i++) {
                    requestParam[strs[i].split("=")[0]] = unescape(strs[i].split("=")[1] || "");
                }
            }
            return requestParam;
        },
        get: function (key) {
            if (key) {
                return this.getParameters()[key];
            }
            return this.getParameters();
        },
        hasParameter: function (key) {
            var parameters = this.getParameters();
            return parameters.hasOwnProperty(key);
        },
        has: function (key) {
            return this.hasParameter(key);
        },
        del: function (key) {
            var value = this.get(key);
            if (!value) {
                return true;
            }
            var keyVal = key + '=' + value;
            var url = location.href
                .replace(keyVal + '&', '')
                .replace('&' + keyVal, '')
                .replace(keyVal, '');
            if (!history) {
                return false;
            }
            history.replaceState(history.state,'',url);
            return true;
        }
    }
    w.urlUtils = new Clazz();
})(window);